package com.tianyi.dao.mapper;

import com.github.pagehelper.Page;
import com.tianyi.dao.entity.comUser.ComUser;
import com.tianyi.dao.entity.comUser.ComUserExample;
import com.tianyi.dao.entity.orders.Orders;
import com.tianyi.dao.entity.orders.OrdersExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
 * order to confirm req
 *
 * @author oh_grd
 */
public interface OrdersMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Orders record);

    int insertSelective(Orders record);

    Page<Orders> selectByExample(OrdersExample example, RowBounds rowBounds);

    List<Orders> selectByExample(OrdersExample example);

    Orders selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Orders record);

    int updateByPrimaryKey(Orders record);

    int updateByOrderNumber(Orders record);

    int deleteByOrderNumber(Orders record);

    List<Orders> queryAllOrders(Orders record);

    List<Orders> queryAllOrdersByStatus(Orders record);

    List<Orders> queryOrdersByPage(int pageStart, int pageSize);

    Orders queryOrderByOrderNumber(long orderNumber);

    List<Orders> queryOrdersByPageByStatus(@Param("pageStart")int pageStart, @Param("pageSize")int pageSize, @Param("orderStatus")String orderStatus);

    Page<Orders> queryOrdersByPageByStatusPageInfo(@Param("pageStart")int pageStart, @Param("pageSize")int pageSize, @Param("orderStatus")String orderStatus);

    List<String> queryProductNumbersByOrderNumber(Orders record);
}